Ext.define('TS.view.general.author.Form', {
    extend: 'TS.lib.Form',
    alias : 'widget.authorform',
    title : 'Autor',
	url:URL.general.form.author,
	items:[
		{xtype:'hidden',name:'author_id'},
		{xtype:'text',fieldLabel:'author_firstname',name:'author_firstname'},
		{xtype:'text',fieldLabel:'author_middlename',name:'author_middlename',b:1},
		{xtype:'text',fieldLabel:'author_lastname',name:'author_lastname'},
		{xtype:'combo',fieldLabel:'language_id',name:'language_id',store:Dict.language},
		{xtype:'combo',fieldLabel:'denomination_id',name:'denomination_id',store:Dict.denomination},
		{xtype: 'file',name: 'author_image',fieldLabel: 'author_image'}
		
	],
	buttons:[{
		text:'Zapisz',
		handler:Util.f.save,
		callback:function(){
			Dict.author.load();
			Util.store('Author').load();
		}
	},{
		text:'Nowy',
		handler:Util.f.clear
	},{
		text:'Usuń',
		handler:Util.f.del,
		handlerConfig:{
			url:URL.general.del.author
		}
	}]
});